from typing import Optional
from pydantic import BaseModel

class HotelBase(BaseModel):
    HotelId: str
    HotelName: str
    HotelEnglishName: Optional[str] = None
    RankCode: str
    Address: str
    TrafficInfo: Optional[str] = None
    Floor: Optional[str] = None
    RoomQuantity: Optional[str] = None
    QuotaPerDays: Optional[str] = None
    Promotion: Optional[str] = None
    Telephone: str
    BasicInfo: Optional[str] = None
    Guarantee: Optional[str] = None
    Currency: str
    CityCode: str
    FAX: Optional[str] = None
    Exceptive: Optional[str] = None
    AgentCommisionRate: Optional[str] = None
    GuaranteePolicy: Optional[str] = None
    Policy: Optional[str] = None
    YLPolicy: Optional[str] = None
    OpenDate: Optional[str] = None
    FitMent: Optional[str] = None
    PositionOfRemark: Optional[str] = None

    class Config:
        from_attributes = True

class HotelCreate(HotelBase):
    pass

class HotelUpdate(HotelBase):
    HotelId: Optional[str] = None
    HotelName: Optional[str] = None
    RankCode: Optional[str] = None
    Address: Optional[str] = None
    Telephone: Optional[str] = None
    Currency: Optional[str] = None
    CityCode: Optional[str] = None

class Hotel(HotelBase):
    ID: int

    class Config:
        from_attributes = True 